from rest_framework import serializers

from goods.models import CategoryVisitCount


class CategoryVisitCountSerializer(serializers.ModelSerializer):
    #获取外键关联表信息
    category = serializers.StringRelatedField(read_only=True)
    class Meta:
        model = CategoryVisitCount
        fields = '__all__'